extends TextureButton


# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
	pass
			
func _on_pressed() -> void:
		# 判断游戏当前是否处于暂停状态
	if get_tree().paused:
		# 如果游戏处于暂停状态，将其恢复运行
		get_tree().paused = false
		print("游戏恢复运行")
	else:
		# 如果游戏正在运行，将其暂停
		$"../Panel".visible = true
		get_tree().paused = true
		print("游戏已暂停")
	pass # Replace with function body.
